<template>
  <div>
    <h3>App</h3>
    <button @click="changeLiuDeHua">刘德华：{{$store.state.liuDeHua}}</button>
    <button @click="changeGuoFuCheng">郭富城：{{$store.state.guoFuCheng}}</button>
    <button @click="changeState({prop:'liMing'})">黎明：{{$store.state.liMing}}</button>
    <button @click="changeZhangXueYou(4)">张学友：{{$store.state.zhangXueYou}}</button>
  </div>
</template>

<script>
export default {
  name: 'App',
  methods: {
    changeLiuDeHua () {
      this.$store.commit('CHANGE_LIU_DE_HUA')
    },
    changeGuoFuCheng () {
      this.$store.commit('CHANGE_GUO_FU_CHENG')
    },
    changeZhangXueYou (count) {
      this.$store.commit('CHANGE_ZHANG_XUE_YOU', (count))
    },
    changeState (payload) {
      this.$store.commit('CHANGE_STATE', payload)
    },
  }
}
</script>

<style scoped>
</style>